﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Net.Http;
using System.Reflection;
using System.Threading.Tasks;
using System.Web.Http;
using d1Common;
using d1Common.WebController;
using d1Project.Modules.Common.doLog.Services;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace d1Project.Modules.Common.do4A.Controllers.a
{
    /// <summary>
    /// 推送信息
    /// </summary>
    [Route("api/ll/PushInfo")]
    public class ListController : ControllerBase
    {
        protected override DbContext dbContext
        {
            get
            {
                return null;
            }
        }
        private do4ADbContext db = new do4ADbContext();

        [HttpPost]
        public async Task<IHttpActionResult> Post([FromBody]PostVm model)
        {
            Res res = new Res();
            doServices.Instance.DoLog.Info("lingling", "令令开门");

            if (model != null)
            {
                doServices.Instance.DoLog.Info("lingling", "参数字符串为：" + model.noticeMsg);

                
            }
            res.status = true;
            res.message = "调用接口成功";

            return Ok(res);
        }

        public class PostVm
        {
            public string noticeMsg { get; set; }
        }
        public  class PushPostVm
        {
            public string noticeName { get; set; }
            public PushInfoPostVm msg { get; set; }
        }
        public class PushInfoPostVm
        {
            /// <summary>
            /// 
            /// </summary>
            public string userFlag { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int funcFlag { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int userType { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int developerId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string deviceCode { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int openTime { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int deviceId { get; set; }
        }
    }
}